package com.tengju.bff.interfaces.covercharge.controller.portal.assembler;

import com.tengju.bff.interfaces.covercharge.entity.model.SmsVerification;
import com.tengju.bff.interfaces.covercharge.entity.vo.SmsVerificationReq;
import com.tengju.bff.interfaces.covercharge.entity.vo.SmsVerificationV2Req;
import com.tengju.user.application.login.dto.SendSmsCodeDTO;
import com.tengju.user.domain.model.login.UserType;
import com.tengju.user.domain.model.sms.OperationType;
import com.tengju.user.domain.model.sms.SendSmsVerifyCodeData;

public class SelfCertificationAssembler {

    public static SmsVerification dtoToModel(SmsVerificationReq smsVerificationReq) {

        return new SmsVerification(
                smsVerificationReq.getName(),
                smsVerificationReq.getIdCardType(),
                smsVerificationReq.getIdCardNo(),
                smsVerificationReq.getMobile(),
                null,null,null
        );

    }

    public static SmsVerification dtoToModel(SmsVerificationV2Req smsVerificationV2Req) {

        return new SmsVerification(
                smsVerificationV2Req.getName(),
                smsVerificationV2Req.getIdCardType(),
                smsVerificationV2Req.getIdCardNo(),
                smsVerificationV2Req.getMobile(),
                smsVerificationV2Req.getChallenge(),
                smsVerificationV2Req.getValidate(),
                smsVerificationV2Req.getSecCode()
        );

    }
}
